/*
 * XML Type:  VisualDiagramJump
 * Namespace: http:///org/isistan/flabot/edit/editormodel.ecore
 * Java type: org.isistan.flabot.edit.editormodelEcore.VisualDiagramJump
 *
 * Automatically generated - do not modify.
 */
package org.isistan.flabot.edit.editormodelEcore.impl;
/**
 * An XML VisualDiagramJump(@http:///org/isistan/flabot/edit/editormodel.ecore).
 *
 * This is a complex type.
 */
public class VisualDiagramJumpImpl extends org.isistan.flabot.edit.editormodelEcore.impl.NodeVisualModelImpl implements org.isistan.flabot.edit.editormodelEcore.VisualDiagramJump
{
    private static final long serialVersionUID = 1L;
    
    public VisualDiagramJumpImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SOURCEDIAGRAM$0 = 
        new javax.xml.namespace.QName("", "sourceDiagram");
    private static final javax.xml.namespace.QName TARGETDIAGRAM$2 = 
        new javax.xml.namespace.QName("", "targetDiagram");
    private static final javax.xml.namespace.QName TARGETVISUALNODE$4 = 
        new javax.xml.namespace.QName("", "targetVisualNode");
    private static final javax.xml.namespace.QName TO$6 = 
        new javax.xml.namespace.QName("", "to");
    private static final javax.xml.namespace.QName SOURCEDIAGRAM2$8 = 
        new javax.xml.namespace.QName("", "sourceDiagram");
    private static final javax.xml.namespace.QName TARGETDIAGRAM2$10 = 
        new javax.xml.namespace.QName("", "targetDiagram");
    private static final javax.xml.namespace.QName TARGETVISUALNODE2$12 = 
        new javax.xml.namespace.QName("", "targetVisualNode");
    
    
    /**
     * Gets array of all "sourceDiagram" elements
     */
    public org.isistan.flabot.edit.editormodelEcore.Diagram[] getSourceDiagramArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(SOURCEDIAGRAM2$8, targetList);
            org.isistan.flabot.edit.editormodelEcore.Diagram[] result = new org.isistan.flabot.edit.editormodelEcore.Diagram[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "sourceDiagram" element
     */
    public org.isistan.flabot.edit.editormodelEcore.Diagram getSourceDiagramArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.edit.editormodelEcore.Diagram target = null;
            target = (org.isistan.flabot.edit.editormodelEcore.Diagram)get_store().find_element_user(SOURCEDIAGRAM2$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "sourceDiagram" element
     */
    public int sizeOfSourceDiagramArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(SOURCEDIAGRAM2$8);
        }
    }
    
    /**
     * Sets array of all "sourceDiagram" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setSourceDiagramArray(org.isistan.flabot.edit.editormodelEcore.Diagram[] sourceDiagramArray)
    {
        check_orphaned();
        arraySetterHelper(sourceDiagramArray, SOURCEDIAGRAM2$8);
    }
    
    /**
     * Sets ith "sourceDiagram" element
     */
    public void setSourceDiagramArray(int i, org.isistan.flabot.edit.editormodelEcore.Diagram sourceDiagram)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.edit.editormodelEcore.Diagram target = null;
            target = (org.isistan.flabot.edit.editormodelEcore.Diagram)get_store().find_element_user(SOURCEDIAGRAM2$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(sourceDiagram);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "sourceDiagram" element
     */
    public org.isistan.flabot.edit.editormodelEcore.Diagram insertNewSourceDiagram(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.edit.editormodelEcore.Diagram target = null;
            target = (org.isistan.flabot.edit.editormodelEcore.Diagram)get_store().insert_element_user(SOURCEDIAGRAM2$8, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "sourceDiagram" element
     */
    public org.isistan.flabot.edit.editormodelEcore.Diagram addNewSourceDiagram()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.edit.editormodelEcore.Diagram target = null;
            target = (org.isistan.flabot.edit.editormodelEcore.Diagram)get_store().add_element_user(SOURCEDIAGRAM2$8);
            return target;
        }
    }
    
    /**
     * Removes the ith "sourceDiagram" element
     */
    public void removeSourceDiagram(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(SOURCEDIAGRAM2$8, i);
        }
    }
    
    /**
     * Gets array of all "targetDiagram" elements
     */
    public org.isistan.flabot.edit.editormodelEcore.Diagram[] getTargetDiagramArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(TARGETDIAGRAM2$10, targetList);
            org.isistan.flabot.edit.editormodelEcore.Diagram[] result = new org.isistan.flabot.edit.editormodelEcore.Diagram[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "targetDiagram" element
     */
    public org.isistan.flabot.edit.editormodelEcore.Diagram getTargetDiagramArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.edit.editormodelEcore.Diagram target = null;
            target = (org.isistan.flabot.edit.editormodelEcore.Diagram)get_store().find_element_user(TARGETDIAGRAM2$10, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "targetDiagram" element
     */
    public int sizeOfTargetDiagramArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(TARGETDIAGRAM2$10);
        }
    }
    
    /**
     * Sets array of all "targetDiagram" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setTargetDiagramArray(org.isistan.flabot.edit.editormodelEcore.Diagram[] targetDiagramArray)
    {
        check_orphaned();
        arraySetterHelper(targetDiagramArray, TARGETDIAGRAM2$10);
    }
    
    /**
     * Sets ith "targetDiagram" element
     */
    public void setTargetDiagramArray(int i, org.isistan.flabot.edit.editormodelEcore.Diagram targetDiagram)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.edit.editormodelEcore.Diagram target = null;
            target = (org.isistan.flabot.edit.editormodelEcore.Diagram)get_store().find_element_user(TARGETDIAGRAM2$10, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(targetDiagram);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "targetDiagram" element
     */
    public org.isistan.flabot.edit.editormodelEcore.Diagram insertNewTargetDiagram(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.edit.editormodelEcore.Diagram target = null;
            target = (org.isistan.flabot.edit.editormodelEcore.Diagram)get_store().insert_element_user(TARGETDIAGRAM2$10, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "targetDiagram" element
     */
    public org.isistan.flabot.edit.editormodelEcore.Diagram addNewTargetDiagram()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.edit.editormodelEcore.Diagram target = null;
            target = (org.isistan.flabot.edit.editormodelEcore.Diagram)get_store().add_element_user(TARGETDIAGRAM2$10);
            return target;
        }
    }
    
    /**
     * Removes the ith "targetDiagram" element
     */
    public void removeTargetDiagram(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(TARGETDIAGRAM2$10, i);
        }
    }
    
    /**
     * Gets array of all "targetVisualNode" elements
     */
    public org.isistan.flabot.edit.editormodelEcore.NodeVisualModel[] getTargetVisualNodeArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(TARGETVISUALNODE2$12, targetList);
            org.isistan.flabot.edit.editormodelEcore.NodeVisualModel[] result = new org.isistan.flabot.edit.editormodelEcore.NodeVisualModel[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "targetVisualNode" element
     */
    public org.isistan.flabot.edit.editormodelEcore.NodeVisualModel getTargetVisualNodeArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.edit.editormodelEcore.NodeVisualModel target = null;
            target = (org.isistan.flabot.edit.editormodelEcore.NodeVisualModel)get_store().find_element_user(TARGETVISUALNODE2$12, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "targetVisualNode" element
     */
    public int sizeOfTargetVisualNodeArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(TARGETVISUALNODE2$12);
        }
    }
    
    /**
     * Sets array of all "targetVisualNode" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setTargetVisualNodeArray(org.isistan.flabot.edit.editormodelEcore.NodeVisualModel[] targetVisualNodeArray)
    {
        check_orphaned();
        arraySetterHelper(targetVisualNodeArray, TARGETVISUALNODE2$12);
    }
    
    /**
     * Sets ith "targetVisualNode" element
     */
    public void setTargetVisualNodeArray(int i, org.isistan.flabot.edit.editormodelEcore.NodeVisualModel targetVisualNode)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.edit.editormodelEcore.NodeVisualModel target = null;
            target = (org.isistan.flabot.edit.editormodelEcore.NodeVisualModel)get_store().find_element_user(TARGETVISUALNODE2$12, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(targetVisualNode);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "targetVisualNode" element
     */
    public org.isistan.flabot.edit.editormodelEcore.NodeVisualModel insertNewTargetVisualNode(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.edit.editormodelEcore.NodeVisualModel target = null;
            target = (org.isistan.flabot.edit.editormodelEcore.NodeVisualModel)get_store().insert_element_user(TARGETVISUALNODE2$12, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "targetVisualNode" element
     */
    public org.isistan.flabot.edit.editormodelEcore.NodeVisualModel addNewTargetVisualNode()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.edit.editormodelEcore.NodeVisualModel target = null;
            target = (org.isistan.flabot.edit.editormodelEcore.NodeVisualModel)get_store().add_element_user(TARGETVISUALNODE2$12);
            return target;
        }
    }
    
    /**
     * Removes the ith "targetVisualNode" element
     */
    public void removeTargetVisualNode(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(TARGETVISUALNODE2$12, i);
        }
    }
    
    /**
     * Gets the "to" attribute
     */
    public boolean getTo()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TO$6);
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "to" attribute
     */
    public org.apache.xmlbeans.XmlBoolean xgetTo()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(TO$6);
            return target;
        }
    }
    
    /**
     * True if has "to" attribute
     */
    public boolean isSetTo()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(TO$6) != null;
        }
    }
    
    /**
     * Sets the "to" attribute
     */
    public void setTo(boolean to)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TO$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(TO$6);
            }
            target.setBooleanValue(to);
        }
    }
    
    /**
     * Sets (as xml) the "to" attribute
     */
    public void xsetTo(org.apache.xmlbeans.XmlBoolean to)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(TO$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(TO$6);
            }
            target.set(to);
        }
    }
    
    /**
     * Unsets the "to" attribute
     */
    public void unsetTo()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(TO$6);
        }
    }
    
    /**
     * Gets the "sourceDiagram" attribute
     */
    public java.lang.String getSourceDiagram2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SOURCEDIAGRAM2$8);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "sourceDiagram" attribute
     */
    public org.apache.xmlbeans.XmlString xgetSourceDiagram2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(SOURCEDIAGRAM2$8);
            return target;
        }
    }
    
    /**
     * True if has "sourceDiagram" attribute
     */
    public boolean isSetSourceDiagram2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(SOURCEDIAGRAM2$8) != null;
        }
    }
    
    /**
     * Sets the "sourceDiagram" attribute
     */
    public void setSourceDiagram2(java.lang.String sourceDiagram2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SOURCEDIAGRAM2$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(SOURCEDIAGRAM2$8);
            }
            target.setStringValue(sourceDiagram2);
        }
    }
    
    /**
     * Sets (as xml) the "sourceDiagram" attribute
     */
    public void xsetSourceDiagram2(org.apache.xmlbeans.XmlString sourceDiagram2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(SOURCEDIAGRAM2$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(SOURCEDIAGRAM2$8);
            }
            target.set(sourceDiagram2);
        }
    }
    
    /**
     * Unsets the "sourceDiagram" attribute
     */
    public void unsetSourceDiagram2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(SOURCEDIAGRAM2$8);
        }
    }
    
    /**
     * Gets the "targetDiagram" attribute
     */
    public java.lang.String getTargetDiagram2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TARGETDIAGRAM2$10);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "targetDiagram" attribute
     */
    public org.apache.xmlbeans.XmlString xgetTargetDiagram2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(TARGETDIAGRAM2$10);
            return target;
        }
    }
    
    /**
     * True if has "targetDiagram" attribute
     */
    public boolean isSetTargetDiagram2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(TARGETDIAGRAM2$10) != null;
        }
    }
    
    /**
     * Sets the "targetDiagram" attribute
     */
    public void setTargetDiagram2(java.lang.String targetDiagram2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TARGETDIAGRAM2$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(TARGETDIAGRAM2$10);
            }
            target.setStringValue(targetDiagram2);
        }
    }
    
    /**
     * Sets (as xml) the "targetDiagram" attribute
     */
    public void xsetTargetDiagram2(org.apache.xmlbeans.XmlString targetDiagram2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(TARGETDIAGRAM2$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(TARGETDIAGRAM2$10);
            }
            target.set(targetDiagram2);
        }
    }
    
    /**
     * Unsets the "targetDiagram" attribute
     */
    public void unsetTargetDiagram2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(TARGETDIAGRAM2$10);
        }
    }
    
    /**
     * Gets the "targetVisualNode" attribute
     */
    public java.lang.String getTargetVisualNode2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TARGETVISUALNODE2$12);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "targetVisualNode" attribute
     */
    public org.apache.xmlbeans.XmlString xgetTargetVisualNode2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(TARGETVISUALNODE2$12);
            return target;
        }
    }
    
    /**
     * True if has "targetVisualNode" attribute
     */
    public boolean isSetTargetVisualNode2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(TARGETVISUALNODE2$12) != null;
        }
    }
    
    /**
     * Sets the "targetVisualNode" attribute
     */
    public void setTargetVisualNode2(java.lang.String targetVisualNode2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TARGETVISUALNODE2$12);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(TARGETVISUALNODE2$12);
            }
            target.setStringValue(targetVisualNode2);
        }
    }
    
    /**
     * Sets (as xml) the "targetVisualNode" attribute
     */
    public void xsetTargetVisualNode2(org.apache.xmlbeans.XmlString targetVisualNode2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(TARGETVISUALNODE2$12);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(TARGETVISUALNODE2$12);
            }
            target.set(targetVisualNode2);
        }
    }
    
    /**
     * Unsets the "targetVisualNode" attribute
     */
    public void unsetTargetVisualNode2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(TARGETVISUALNODE2$12);
        }
    }
}
